#!/bin/bas
le_dir="/root/aml/dwd/"
log_dir="/root/aml/dwd/logs/"
etl_dt=`date -d '-1 day' +"%Y-%m-%d"`
nohup hive -hivevar dt="$etl_dt" -f "$file_dir"dwd.dim_aml_account_inc.sql > "$log_dir"-"dwd.dim_aml_account_inc.sql"-"$etl_dt".log &
nohup hive -hivevar dt="$etl_dt" -f "$file_dir"dwd.dim_aml_customer_full.sql > "$log_dir"-"dwd.dim_aml_customer_full.sql"-"$etl_dt".log &
nohup hive -hivevar dt="$etl_dt" -f "$file_dir"dwd.dim_aml_rule_full.sql > "$log_dir"-"dwd.dim_aml_rule_full.sql"-"$etl_dt".log &
nohup hive -hivevar dt="$etl_dt" -f "$file_dir"dwd.dim_aml_watchlist_inc.sql > "$log_dir"-"dwd.dim_aml_watchlist_inc.sql"-"$etl_dt".log &
nohup hive -hivevar dt="$etl_dt" -f "$file_dir"dwd.fact_aml_alert_inc.sql > "$log_dir"-"dwd.fact_aml_alert_inc.sql"-"$etl_dt".log &
nohup hive -hivevar dt="$etl_dt" -f "$file_dir"dwd.fact_aml_screening_inc.sql > "$log_dir"-"dwd.fact_aml_screening_inc.sql"-"$etl_dt".log &
nohup hive -hivevar dt="$etl_dt" -f "$file_dir"dwd.fact_aml_str_report_inc.sql > "$log_dir"-"dwd.fact_aml_str_report_inc.sql"-"$etl_dt".log &
nohup hive -hivevar dt="$etl_dt" -f "$file_dir"dwd.fact_aml_transaction_inc.sql > "$log_dir"-"dwd.fact_aml_transaction_inc.sql"-"$etl_dt".log &
nohup hive -hivebar dt="$etl_dt" -f "$file_dir"dws_aml_customer_risk_profile.sql > "$log_dir"-"dws_aml_customer_risk_profile.sql"="$etl_dt".log &
nohup hive -hivebar dt="$etl_dt" -f "$file_dir"dws_aml_risk_dashboard.sql > "$log_dir"-"dws_aml_risk_dashboard.sql"="$etl_dt"
.log &
nohup hive -hivebar dt="$etl_dt" -f "$file_dir"dws_aml_transaction_behavior.sql > "$log_dir"-"dws_aml_transaction_behavior.sql"="$etl_dt"
.log &
rm -rf `find /root/test -mtime 2`